package com.jiuyue.movehouse.controller;


import com.jiuyue.movehouse.entity.CarType;
import com.jiuyue.movehouse.service.CarTypeService;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yourFather
 * @since 2022-02-11
 */
@RestController
@RequestMapping("/car-type")
@AllArgsConstructor
public class CarTypeController {


    private CarTypeService carTypeService;

    @PutMapping("updateCarType")
    public void updateCarType(@RequestBody @Validated(CarType.Update.class) CarType carType) {
        carTypeService.updateCarType(carType);
    }

}

